#define _CRT_SECURE_NO_WARNINGS

void swap(int* a, int* b) {
    int t = *a;
    *a = *b, * b = t;
}

void moveZeroes(int nums[7], int numsSize) {
    int left = 0, right = 0;
    while (right < numsSize) {
        if (nums[right]) {
            swap(nums + left, nums + right);
            left++;
        }
        right++;
    }
}

int main()
{
    int nums[] = { 1,0,0,2,1,4,0 };

    moveZeroes(nums, 7);

    return 0;
}